# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>

pkgbase=phonon
pkgname=(phonon-qt5)
pkgdesc="The multimedia framework by KDE"
pkgver=4.11.1
pkgrel=2
arch=(x86_64)
url='https://community.kde.org/Phonon'
license=(LGPL)
depends=(libpulse qt5-base)
optdepends=('pulseaudio: PulseAudio support' 'qt5-tools: Designer plugin')
makedepends=(extra-cmake-modules qt5-tools)
source=("https://download.kde.org/stable/$pkgbase/$pkgver/$pkgbase-$pkgver.tar.xz"{,.sig})
sha256sums=('b4431ea2600df8137a717741ad9ebc7f7ec1649fa3e138541d8f42597144de2d'
            'SKIP')
validpgpkeys=(CB9387521E1EE0127DA804843FDBB55084CC5D84) # Harald Sitter <sitter@kde.org>

prepare() {
  mkdir -p build
}

build() {
  cd build
  cmake ../$pkgbase-$pkgver
  make
}

package_phonon-qt5(){
  depends+=(phonon-qt5-backend)
  cd build
  make DESTDIR="$pkgdir" install
}
